// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using System;
using System.Threading;
using System.Threading.Tasks;

#nullable restore
namespace Elastic.Clients.Elasticsearch.Slm
{
	public class SlmNamespace : NamespacedClientProxy
	{
		internal SlmNamespace(ElasticsearchClient client) : base(client)
		{
		}

		public SlmDeleteLifecycleResponse DeleteLifecycle(SlmDeleteLifecycleRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmDeleteLifecycleRequest, SlmDeleteLifecycleResponse>(request);
		}

		public Task<SlmDeleteLifecycleResponse> DeleteLifecycleAsync(SlmDeleteLifecycleRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmDeleteLifecycleRequest, SlmDeleteLifecycleResponse>(request, cancellationToken);
		}

		public SlmDeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticsearch.Name policy_id)
		{
			var descriptor = new SlmDeleteLifecycleRequestDescriptor(policy_id);
			descriptor.BeforeRequest();
			return DoRequest<SlmDeleteLifecycleRequestDescriptor, SlmDeleteLifecycleResponse>(descriptor);
		}

		public SlmDeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticsearch.Name policy_id, Action<SlmDeleteLifecycleRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmDeleteLifecycleRequestDescriptor(policy_id);
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmDeleteLifecycleRequestDescriptor, SlmDeleteLifecycleResponse>(descriptor);
		}

		public Task<SlmDeleteLifecycleResponse> DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmDeleteLifecycleRequestDescriptor(policy_id);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmDeleteLifecycleRequestDescriptor, SlmDeleteLifecycleResponse>(descriptor);
		}

		public Task<SlmDeleteLifecycleResponse> DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, Action<SlmDeleteLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmDeleteLifecycleRequestDescriptor(policy_id);
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmDeleteLifecycleRequestDescriptor, SlmDeleteLifecycleResponse>(descriptor);
		}

		public SlmExecuteLifecycleResponse ExecuteLifecycle(SlmExecuteLifecycleRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmExecuteLifecycleRequest, SlmExecuteLifecycleResponse>(request);
		}

		public Task<SlmExecuteLifecycleResponse> ExecuteLifecycleAsync(SlmExecuteLifecycleRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmExecuteLifecycleRequest, SlmExecuteLifecycleResponse>(request, cancellationToken);
		}

		public SlmExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elasticsearch.Name policy_id)
		{
			var descriptor = new SlmExecuteLifecycleRequestDescriptor(policy_id);
			descriptor.BeforeRequest();
			return DoRequest<SlmExecuteLifecycleRequestDescriptor, SlmExecuteLifecycleResponse>(descriptor);
		}

		public SlmExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elasticsearch.Name policy_id, Action<SlmExecuteLifecycleRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmExecuteLifecycleRequestDescriptor(policy_id);
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmExecuteLifecycleRequestDescriptor, SlmExecuteLifecycleResponse>(descriptor);
		}

		public Task<SlmExecuteLifecycleResponse> ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmExecuteLifecycleRequestDescriptor(policy_id);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmExecuteLifecycleRequestDescriptor, SlmExecuteLifecycleResponse>(descriptor);
		}

		public Task<SlmExecuteLifecycleResponse> ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, Action<SlmExecuteLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmExecuteLifecycleRequestDescriptor(policy_id);
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmExecuteLifecycleRequestDescriptor, SlmExecuteLifecycleResponse>(descriptor);
		}

		public SlmExecuteRetentionResponse ExecuteRetention(SlmExecuteRetentionRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmExecuteRetentionRequest, SlmExecuteRetentionResponse>(request);
		}

		public Task<SlmExecuteRetentionResponse> ExecuteRetentionAsync(SlmExecuteRetentionRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmExecuteRetentionRequest, SlmExecuteRetentionResponse>(request, cancellationToken);
		}

		public SlmExecuteRetentionResponse ExecuteRetention()
		{
			var descriptor = new SlmExecuteRetentionRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<SlmExecuteRetentionRequestDescriptor, SlmExecuteRetentionResponse>(descriptor);
		}

		public SlmExecuteRetentionResponse ExecuteRetention(Action<SlmExecuteRetentionRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmExecuteRetentionRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmExecuteRetentionRequestDescriptor, SlmExecuteRetentionResponse>(descriptor);
		}

		public Task<SlmExecuteRetentionResponse> ExecuteRetentionAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmExecuteRetentionRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmExecuteRetentionRequestDescriptor, SlmExecuteRetentionResponse>(descriptor);
		}

		public Task<SlmExecuteRetentionResponse> ExecuteRetentionAsync(Action<SlmExecuteRetentionRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmExecuteRetentionRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmExecuteRetentionRequestDescriptor, SlmExecuteRetentionResponse>(descriptor);
		}

		public SlmGetLifecycleResponse GetLifecycle(SlmGetLifecycleRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmGetLifecycleRequest, SlmGetLifecycleResponse>(request);
		}

		public Task<SlmGetLifecycleResponse> GetLifecycleAsync(SlmGetLifecycleRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmGetLifecycleRequest, SlmGetLifecycleResponse>(request, cancellationToken);
		}

		public SlmGetLifecycleResponse GetLifecycle()
		{
			var descriptor = new SlmGetLifecycleRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<SlmGetLifecycleRequestDescriptor, SlmGetLifecycleResponse>(descriptor);
		}

		public SlmGetLifecycleResponse GetLifecycle(Action<SlmGetLifecycleRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmGetLifecycleRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmGetLifecycleRequestDescriptor, SlmGetLifecycleResponse>(descriptor);
		}

		public Task<SlmGetLifecycleResponse> GetLifecycleAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmGetLifecycleRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmGetLifecycleRequestDescriptor, SlmGetLifecycleResponse>(descriptor);
		}

		public Task<SlmGetLifecycleResponse> GetLifecycleAsync(Action<SlmGetLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmGetLifecycleRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmGetLifecycleRequestDescriptor, SlmGetLifecycleResponse>(descriptor);
		}

		public SlmGetStatsResponse GetStats(SlmGetStatsRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmGetStatsRequest, SlmGetStatsResponse>(request);
		}

		public Task<SlmGetStatsResponse> GetStatsAsync(SlmGetStatsRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmGetStatsRequest, SlmGetStatsResponse>(request, cancellationToken);
		}

		public SlmGetStatsResponse GetStats()
		{
			var descriptor = new SlmGetStatsRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<SlmGetStatsRequestDescriptor, SlmGetStatsResponse>(descriptor);
		}

		public SlmGetStatsResponse GetStats(Action<SlmGetStatsRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmGetStatsRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmGetStatsRequestDescriptor, SlmGetStatsResponse>(descriptor);
		}

		public Task<SlmGetStatsResponse> GetStatsAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmGetStatsRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmGetStatsRequestDescriptor, SlmGetStatsResponse>(descriptor);
		}

		public Task<SlmGetStatsResponse> GetStatsAsync(Action<SlmGetStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmGetStatsRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmGetStatsRequestDescriptor, SlmGetStatsResponse>(descriptor);
		}

		public SlmGetStatusResponse GetStatus(SlmGetStatusRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmGetStatusRequest, SlmGetStatusResponse>(request);
		}

		public Task<SlmGetStatusResponse> GetStatusAsync(SlmGetStatusRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmGetStatusRequest, SlmGetStatusResponse>(request, cancellationToken);
		}

		public SlmGetStatusResponse GetStatus()
		{
			var descriptor = new SlmGetStatusRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<SlmGetStatusRequestDescriptor, SlmGetStatusResponse>(descriptor);
		}

		public SlmGetStatusResponse GetStatus(Action<SlmGetStatusRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmGetStatusRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmGetStatusRequestDescriptor, SlmGetStatusResponse>(descriptor);
		}

		public Task<SlmGetStatusResponse> GetStatusAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmGetStatusRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmGetStatusRequestDescriptor, SlmGetStatusResponse>(descriptor);
		}

		public Task<SlmGetStatusResponse> GetStatusAsync(Action<SlmGetStatusRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmGetStatusRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmGetStatusRequestDescriptor, SlmGetStatusResponse>(descriptor);
		}

		public SlmPutLifecycleResponse PutLifecycle(SlmPutLifecycleRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmPutLifecycleRequest, SlmPutLifecycleResponse>(request);
		}

		public Task<SlmPutLifecycleResponse> PutLifecycleAsync(SlmPutLifecycleRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmPutLifecycleRequest, SlmPutLifecycleResponse>(request, cancellationToken);
		}

		public SlmPutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.Name policy_id)
		{
			var descriptor = new SlmPutLifecycleRequestDescriptor(policy_id);
			descriptor.BeforeRequest();
			return DoRequest<SlmPutLifecycleRequestDescriptor, SlmPutLifecycleResponse>(descriptor);
		}

		public SlmPutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.Name policy_id, Action<SlmPutLifecycleRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmPutLifecycleRequestDescriptor(policy_id);
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmPutLifecycleRequestDescriptor, SlmPutLifecycleResponse>(descriptor);
		}

		public Task<SlmPutLifecycleResponse> PutLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmPutLifecycleRequestDescriptor(policy_id);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmPutLifecycleRequestDescriptor, SlmPutLifecycleResponse>(descriptor);
		}

		public Task<SlmPutLifecycleResponse> PutLifecycleAsync(Elastic.Clients.Elasticsearch.Name policy_id, Action<SlmPutLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmPutLifecycleRequestDescriptor(policy_id);
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmPutLifecycleRequestDescriptor, SlmPutLifecycleResponse>(descriptor);
		}

		public SlmStartResponse Start(SlmStartRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmStartRequest, SlmStartResponse>(request);
		}

		public Task<SlmStartResponse> StartAsync(SlmStartRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmStartRequest, SlmStartResponse>(request, cancellationToken);
		}

		public SlmStartResponse Start()
		{
			var descriptor = new SlmStartRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<SlmStartRequestDescriptor, SlmStartResponse>(descriptor);
		}

		public SlmStartResponse Start(Action<SlmStartRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmStartRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmStartRequestDescriptor, SlmStartResponse>(descriptor);
		}

		public Task<SlmStartResponse> StartAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmStartRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmStartRequestDescriptor, SlmStartResponse>(descriptor);
		}

		public Task<SlmStartResponse> StartAsync(Action<SlmStartRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmStartRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmStartRequestDescriptor, SlmStartResponse>(descriptor);
		}

		public SlmStopResponse Stop(SlmStopRequest request)
		{
			request.BeforeRequest();
			return DoRequest<SlmStopRequest, SlmStopResponse>(request);
		}

		public Task<SlmStopResponse> StopAsync(SlmStopRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<SlmStopRequest, SlmStopResponse>(request, cancellationToken);
		}

		public SlmStopResponse Stop()
		{
			var descriptor = new SlmStopRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<SlmStopRequestDescriptor, SlmStopResponse>(descriptor);
		}

		public SlmStopResponse Stop(Action<SlmStopRequestDescriptor> configureRequest)
		{
			var descriptor = new SlmStopRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<SlmStopRequestDescriptor, SlmStopResponse>(descriptor);
		}

		public Task<SlmStopResponse> StopAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmStopRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmStopRequestDescriptor, SlmStopResponse>(descriptor);
		}

		public Task<SlmStopResponse> StopAsync(Action<SlmStopRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new SlmStopRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<SlmStopRequestDescriptor, SlmStopResponse>(descriptor);
		}
	}
}